package com.wxdc.nmgyt.nmgytwydc.common;

import android.util.Log;

/**
 * Created by Administrator on 2018/3/27.
 */

public class DoubleClickExit {
    /**
     * 双击退出检测, 阈值 1000ms
     */
    public static long lastClick = 0L;
    private static final int THRESHOLD = 2000;// 1000ms

    public static boolean check() {
        long now = System.currentTimeMillis();
        Log.i("TAG", "check: ---------doubleClickExit----now:"+now);
        boolean b = now - lastClick < THRESHOLD;
        lastClick = now;
        Log.i("TAG", "check: ---------doubleClickExit----lastclick:"+b);
        return b;
    }
}
